package com.lantosec.hmrp.modules.archives.entity;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserOfficeVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 任职信息表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserOffice extends BaseEntity<UserOfficeVO> {

    private static final long serialVersionUID = 1L;
    public UserOffice(UserOfficeVO vo){
        this.userOfficeId = vo.getUserOfficeId();
        this.userId = vo.getUserId();
        this.onboardingDate = vo.getOnboardingDate();
        this.qualifyDate = vo.getQualifyDate();
        this.endDate = vo.getEndDate();
        this.deptId = vo.getDeptId();
        this.deptName = vo.getDeptName();
        this.positionId = vo.getPositionId();
        this.positionName = vo.getPositionName();
        this.duty = vo.getDuty();
        this.dutyLevel = vo.getDutyLevel();
        this.personType = vo.getPersonType();
        this.chargeWork = vo.getChargeWork();
        this.remark = vo.getRemark();
        this.createId = vo.getCreateId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.verifyId = vo.getVerifyId();
        this.verifyUser = vo.getVerifyUser();
        this.verifyTime = vo.getVerifyTime();
        this.verifyStatus = vo.getVerifyStatus();
    }

    @Override
    public UserOfficeVO convertToVO(){
        return new UserOfficeVO(this);
    }


    /**
     * 主键ID，UUID
     */
    @TableId(value = "user_office_id", type = IdType.ASSIGN_UUID)
    private String userOfficeId;

    /**
     * user主表ID
     */
    private String userId;

    /**
     * 入职日期
     */
    private String onboardingDate;

    /**
     * 转正日期
     */
    private String qualifyDate;

    /**
     * 任职终止时间
     */
    private String endDate;

    /**
     * 科室ID
     */
    private String deptId;

    /**
     * 科室名称
     */
    private String deptName;

    /**
     * 岗位ID
     */
    private String positionId;

    /**
     * 岗位名称
     */
    private String positionName;

    /**
     * 职务，字典值
     */
    private String duty;

    /**
     * 职级，字典值
     */
    private String dutyLevel;

    /**
     * 人员类别，字典值
     */
    private String personType;

    /**
     * 分管工作
     */
    private String chargeWork;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人ID
     */
    private String createId;

    /**
     * 创建人姓名
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 审核人ID
     */
    private String verifyId;

    /**
     * 审核人姓名
     */
    private String verifyUser;

    /**
     * 审核时间
     */
    private Date verifyTime;

    /**
     * 审核状态（0：未审核，1：以审核）
     */
    private Integer verifyStatus;


    public enum ColName {
        user_office_id, user_id, onboarding_date, qualify_date, end_date, dept_id, dept_name, position_id, position_name, duty, duty_level, person_type, charge_work, remark, create_id, create_user, create_time, verify_id, verify_user, verify_time, verify_status, 
    }
}
